package com.xyzq.cgate.admin.wrapper;

import com.xyzq.cgate.common.entity.Plugin;
import com.xyzq.cgate.common.entity.Sign;
import com.xyzq.cgate.common.enums.OpenStateEnum;
import com.xyzq.cgate.common.enums.PluginRoleEnum;

/**
 * @Description:
 * @author chenchen
 * @date 2019/6/10 15:18
 */
public class SignWrapper {
    public final static Sign wrapper(Sign sign) {
        if(OpenStateEnum.OPEN.getCode().equals(sign.getEnabled())) {
            sign.setEnabledContent(OpenStateEnum.OPEN.isOpen());
        } else {
            sign.setEnabledContent(OpenStateEnum.CLOSE.isOpen());
        }
        return sign;
    }
}
